//获取字典指定数组
import { useDictStore } from "@/store/dict";
const { dictList,getDictList } =useDictStore();
getDictList()
interface arr {
    [index: string]: any
}
let dictObjList = [] as Array<arr>
let dictObj = {} as arr
export default function getDictObj(val: string, val2: string) {
    dictList.forEach((item:any, index:number) => {
        if (item.type == val) {
            dictObjList = JSON.parse(JSON.stringify(item.list))
        }
    })
    dictObjList.forEach((item, index) => {
        dictObj = { ...dictObj, ...item }
    })
    return dictObj[val2] ? dictObj[val2] : '未知'
}